<!DOCTYPE html>
<html>
    <head>
        <script src="js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <button @click="child">查看子组件</button>
            <my-component></my-component>
        </div>
        <script>
            Vue.component('my-component',{
                template:'<div>这是自定义组件</div>'
            });

            var vm = new Vue({
                el:'#app',
                methods : {
                    child(){
                        console.log(this.$children);
                    }
                }
            });
        </script>
    </body>
</html>